{extend name="common:base" /}

{block name="page_title"}编辑【{$baseProjectName}】配置{/block}
{block name="style"}
<link href="https://cdn.staticfile.org/pretty-checkbox/3.0.3/pretty-checkbox.min.css" rel="stylesheet">
{/block}
{block name="content"}
<div class="box" id="app">
    <div class="box-header with-border"></div>
    <form class="form-horizontal ajaxForm3" name="form0" method="post" action="{:url('')}">
        <div class="box-body">
            <div class="form-group">
                <label class="col-sm-2 control-label">是否使用自己的短信</label>
                <div class="col-sm-10">
                    <div class="pretty p-default p-round">
                        <input type="radio" name="if_own_sms" class="minimal" value="0" v-model="if_own_sms">
                        <div class="state p-info-o">
                            <label>否</label>
                        </div>
                    </div>
                    <div class="pretty p-default p-round">
                        <input type="radio" name="if_own_sms" class="minimal" value="1" v-model="if_own_sms">
                        <div class="state p-info-o">
                            <label>是</label>
                        </div>
                    </div>
                </div>
            </div>

            <div class="form-group" v-show="1 == if_own_sms">
                <label class="col-sm-2 control-label">短信AccessKeyId</label>
                <div class="col-sm-10">
                    <input type="text" name="site_sms_access_key_id" class="form-control" value="{model:safe_show field='site_sms_access_key_id' /}">
                </div>
            </div>

            <div class="form-group" v-show="1 == if_own_sms">
                <label class="col-sm-2 control-label">短信accessKeySecret</label>
                <div class="col-sm-10">
                    <input type="text" name="site_sms_access_key_secret" class="form-control" value="{model:safe_show field='site_sms_access_key_secret' /}">
                </div>
            </div>

            <div class="form-group" v-show="1 == if_own_sms">
                <label class="col-sm-2 control-label">短信签名</label>
                <div class="col-sm-10">
                    <input type="text" name="site_sms_sign_name" class="form-control" value="{model:safe_show field='site_sms_sign_name' /}">
                </div>
            </div>

            <div class="form-group" v-show="1 == if_own_sms">
                <label class="col-sm-2 control-label">短信模板编号 - 验证码</label>
                <div class="col-sm-10">
                    <input type="text" name="site_sms_template_code_vcode" class="form-control" value="{model:safe_show field='site_sms_template_code_vcode' /}">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">会员等级升级依据</label>
                <div class="col-sm-10">
                    <div class="pretty p-default p-round">
                        <input type="radio" name="member_level_upgrading_conditions" class="minimal" value="0" v-model="member_level_upgrading_conditions">
                        <div class="state p-info-o">
                            <label>已完成的订单金额</label>
                        </div>
                    </div>
                    <div class="pretty p-default p-round">
                        <input type="radio" name="member_level_upgrading_conditions" class="minimal" value="1" v-model="member_level_upgrading_conditions">
                        <div class="state p-info-o">
                            <label>已完成的订单数量</label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
            <div class="row">
                <div class="col-xs-2"></div>
                <div class="col-xs-10">
                    <button type="submit" class="btn btn-info ladda-button" data-style="expand-left" data-plugin="ladda">
                        <span class="ladda-label"><i class="icon wb-arrow-expand margin-right-10" aria-hidden="true"></i>提交</span>
                    </button>
                </div>
            </div>
        </div>
        <!-- /.box-footer -->
    </form>
</div>
{/block}

{block name="script"}
<script src="https://cdn.staticfile.org/select2/4.0.5/js/select2.min.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            if_own_sms:{model:safe_show field="if_own_sms" default="0" /}
            ,member_level_upgrading_conditions:{model:safe_show field="member_level_upgrading_conditions" default="0" /}
        }
        ,
        methods:{}
    });
</script>
{/block}